// $.bootstrapGrowl("My message");
//
// $.bootstrapGrowl("another message, yay!", {
//     ele: 'body', // which element to append to  绑定到某个元素
//     type: 'info', // (null, 'info', 'danger', 'success')  提示的类型
//     offset: {from: 'top', amount: 20}, // 'top', or 'bottom' 相对顶部或者底部的距离
//     align: 'right', // ('left', 'right', or 'center')    位置 左右居中
//     width: 250, // (integer, or 'auto') 宽度
//     delay: 4000, // Time while the message will be displayed. It's not equivalent to the *demo* timeOut!  自动消失时间设置
//     allow_dismiss: true, // If true then will display a cross to close the popup. 是否出现小叉叉点击就取消提示框
//     stackup_spacing: 10 // spacing between consecutively stacked growls. 这是嘛不太懂 说啥间距嘛的
// });


// $.bootstrapGrowl("My message");
//
// $.bootstrapGrowl("another message, yay!", {
//     ele: 'body', // which element to append to  绑定到某个元素
//     type: 'info', // (null, 'info', 'danger', 'success')  提示的类型
//     offset: {from: 'top', amount: 10}, // 'top', or 'bottom' 相对顶部或者底部的距离
//     align: 'center', // ('left', 'right', or 'center')    位置 左右居中
//     width: 250, //  宽度
//     height: 100,
//     delay: 1500,// 自动消失时间设置
//     allow_dismiss: true,
//     stackup_spacing: 20,
// });
const type =
    {
        INFO: "info", DANGER: "danger", SUCCESS: "success"
    };

function errorMsg(mess, type) {
    $.notify({
        icon: 'glyphicon glyphicon-danger-sign',
        message: mess,
    }, {
        type: type,
        element: 'body',
        position: null,
        allow_dismiss: true,
        newest_on_top: true,
        showProgressbar: false,
        placement: {
            from: "top",
            align: "center"
        },
        offset: 20,
        spacing: 10,
        z_index: 9999,
        delay: 300,
        timer: 1200,
        url_target: '_blank',
        mouse_over: null,
        animate: {
            enter: 'animated fadeInDown',
            exit: 'animated fadeOutUp'
        },
        onShow: null,
        onShown: null,
        onClose: null,
        onClosed: null,
        icon_type: 'class',
        template:
            '<div data-notify="container" class="col-xs-4 col-sm-2 alert alert-{0}" role="alert">' +
            '<span data-notify="title">{1}</span>' +
            '<span data-notify="message">{2}</span>' +
            '</div>'
    });
}

//$.notify({
// 	// options
// 	icon: 'glyphicon glyphicon-warning-sign',
// 	title: 'Bootstrap notify',
// 	message: 'Turning standard Bootstrap alerts into "notify" like notifications',
// 	url: 'https://github.com/mouse0270/bootstrap-notify',
// 	target: '_blank'
// },{
// 	// settings
// 	element: 'body',
// 	position: null,
// 	type: "info",
// 	allow_dismiss: true,
// 	newest_on_top: false,
// 	showProgressbar: false,
// 	placement: {
// 		from: "top",
// 		align: "right"
// 	},
// 	offset: 20,
// 	spacing: 10,
// 	z_index: 1031,
// 	delay: 5000,
// 	timer: 1000,
// 	url_target: '_blank',
// 	mouse_over: null,
// 	animate: {
// 		enter: 'animated fadeInDown',
// 		exit: 'animated fadeOutUp'
// 	},
// 	onShow: null,
// 	onShown: null,
// 	onClose: null,
// 	onClosed: null,
// 	icon_type: 'class',
// 	template: '<div data-notify="container" class="col-xs-11 col-sm-3 alert alert-{0}" role="alert">' +
// 		'<button type="button" aria-hidden="true" class="close" data-notify="dismiss">×</button>' +
// 		'<span data-notify="icon"></span> ' +
// 		'<span data-notify="title">{1}</span> ' +
// 		'<span data-notify="message">{2}</span>' +
// 		'<div class="progress" data-notify="progressbar">' +
// 			'<div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>' +
// 		'</div>' +
// 		'<a href="{3}" target="{4}" data-notify="url"></a>' +
// 	'</div>'
// });